<?
if (isset($img_result)):
    foreach ($img_result->result() as $row):
        ?>
    <div style="display:block;float:left;margin:10px">
        <h1><?=$row->name?></h1>
        <a href="<?=site_url('index/show_file/2/'.$row->id.'?url=' . $row->dir)?>">
            <img src="<?=$row->dir?>" alt="Owner: <?=$row->owner?>" width="200px"/>
        </a>
    </div>
    <?
    endforeach;
else:
    echo 'No Image Found';
endif;